﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BorisTheBlade
{
	/// <summary>
	/// Настройки арбитражного бота
	/// </summary>
	class BotSettings
	{
		public BotSettings()
		{
			m_WorkSecurity = new WrapperSecurities();
			m_WorkSecurity.SecCode = string.Empty;
			m_HedjSecurity = new WrapperSecurities();
			m_HedjSecurity.SecCode = string.Empty;
		}

		private WrapperSecurities m_WorkSecurity;
		public WrapperSecurities WorkSecurity { get { return m_WorkSecurity; } set {m_WorkSecurity = value;} }
		private WrapperSecurities m_HedjSecurity;
		public WrapperSecurities HedjSecurity { get { return m_HedjSecurity; } set { m_HedjSecurity = value; } }

		private string m_WorkLogin;
		public string WorkLogin { get { return m_WorkLogin; } set { m_WorkLogin = value; } }
		private string m_WorkPass;
		public string WorkPass { get { return m_WorkPass; } set { m_WorkPass = value; } }
		private string m_WorkServ;
		public string WorkServ { get { return m_WorkServ; } set { m_WorkServ = value; } }
		private string m_HedjLogin;
		public string HedjLogin { get { return m_HedjLogin; } set { m_HedjLogin = value; } }
		private string m_HedjPass;
		public string HedjPass { get { return m_HedjPass; } set { m_HedjPass = value; } }
		private string m_HedjServ;
		public string HedjServ { get { return m_HedjServ; } set { m_HedjServ = value; } }

		private string m_WorkSec;
		public string WorkSec { get { return m_WorkSec; } set { m_WorkSec = value; } }
		private string m_WorkVol;
		public string WorkVol { get { return m_WorkVol; } set { m_WorkVol = value; IntWorkVol = int.Parse(value); } }
        private string m_WorkVol2;
        public string WorkVol2 { get { return m_WorkVol2; } set { m_WorkVol2 = value; IntWorkVol2 = int.Parse(value); } }
        private string m_WorkVol3;
        public string WorkVol3 { get { return m_WorkVol3; } set { m_WorkVol3 = value; IntWorkVol3 = int.Parse(value); } }
        private string m_WorkVol4;
        public string WorkVol4 { get { return m_WorkVol4; } set { m_WorkVol4 = value; IntWorkVol4 = int.Parse(value); } }
		private string m_HedjSec;
		public string HedjSec { get { return m_HedjSec; } set { m_HedjSec = value; } }
		private string m_KHedj;
		public string KHedj { get { return m_KHedj; } set { m_KHedj = value; FloatKHedj = float.Parse(value); } }

		private string m_SellDisp;
		public string SellDisp { get { return m_SellDisp; } set { m_SellDisp = value; IntSellDisp = int.Parse(value); } }
		private string m_BuyDisp;
		public string BuyDisp { get { return m_BuyDisp; } set { m_BuyDisp = value; IntBuyDisp = int.Parse(value); } }

		private string m_Package;
		public string Package { get { return m_Package; } set { m_Package = value; IntPackage = int.Parse(value); } }
		private string m_Averaging;
		public string Averaging { get { return m_Averaging; } set { m_Averaging = value; IntAveraging = int.Parse(value); } }
		private string m_Max;
		public string Max { get { return m_Max; } set { m_Max = value; IntMax = int.Parse(value); } }
		private string m_Hotelka;
		public string Hotelka { get { return m_Hotelka; } set { m_Hotelka = value; IntHotelka = int.Parse(value); } }

        private string m_Package2;
        public string Package2 { get { return m_Package2; } set { m_Package2 = value; IntPackage2 = int.Parse(value); } }
        private string m_Averaging2;
        public string Averaging2 { get { return m_Averaging2; } set { m_Averaging2 = value; IntAveraging2 = int.Parse(value); } }
        private string m_Max2;
        public string Max2 { get { return m_Max2; } set { m_Max2 = value; IntMax2 = int.Parse(value); } }
        private string m_Hotelka2;
        public string Hotelka2 { get { return m_Hotelka2; } set { m_Hotelka2 = value; IntHotelka2 = int.Parse(value); } }

        private string m_Opora;
        public string Opora { get { return m_Opora; } set { m_Opora = value; IntOpora = int.Parse(value); } }
        private string m_Opora2;
        public string Opora2 { get { return m_Opora2; } set { m_Opora2 = value; IntOpora2 = int.Parse(value); } }
        private string m_Opora3;
        public string Opora3 { get { return m_Opora3; } set { m_Opora3 = value; IntOpora3 = int.Parse(value); } }
        private string m_Opora4;
        public string Opora4 { get { return m_Opora4; } set { m_Opora4 = value; IntOpora4 = int.Parse(value); } }

        private string m_BeforeHedj;
        public string BeforeHedj { get { return m_BeforeHedj; } set { m_BeforeHedj = value; IntBeforeHedj = int.Parse(value); } }
        private string m_BeforeWork;
        public string BeforeWork { get { return m_BeforeWork; } set { m_BeforeWork = value; IntBeforeWork = int.Parse(value); } }
        private string m_Key;
        public string Key { get { return m_Key; } set { m_Key = value;} }
        private string m_Top;
        public string Top { get { return m_Top; } set { m_Top = value; IntTop = int.Parse(value); } }
        private string m_Left;
        public string Left { get { return m_Left; } set { m_Left = value; IntLeft = int.Parse(value); } }

        private string m_StakanHole;
        public string StakanHole { get { return m_StakanHole; } set { m_StakanHole = value; m_IntStakanHole = int.Parse(value); } }

        private string m_AutoStep;
        public string AutoStep { get { return m_AutoStep; } set { m_AutoStep = value; FloatAutoStep = float.Parse(value); } }

        private string m_SellAllIn;
        public string SellAllIn { get { return m_SellAllIn; } set { m_SellAllIn = value; m_IntSellAllIn = int.Parse(value); } }
        private string m_SellAllOut;
        public string SellAllOut { get { return m_SellAllOut; } set { m_SellAllOut = value; m_IntSellAllOut = int.Parse(value); } }
        private string m_BuyAllIn;
        public string BuyAllIn { get { return m_BuyAllIn; } set { m_BuyAllIn = value; m_IntBuyAllIn = int.Parse(value); } }
        private string m_BuyAllOut;
        public string BuyAllOut { get { return m_BuyAllOut; } set { m_BuyAllOut = value; m_IntBuyAllOut = int.Parse(value); } }

        private int m_IntCurWorkVol;
        public int IntCurWorkVol { get { return m_IntCurWorkVol; } set { m_IntCurWorkVol = value; } }
		private int m_IntWorkVol;
		public int IntWorkVol { get { return m_IntWorkVol; } set { m_IntWorkVol = value; } }
        private int m_IntWorkVol2;
        public int IntWorkVol2 { get { return m_IntWorkVol2; } set { m_IntWorkVol2 = value; } }
        private int m_IntWorkVol3;
        public int IntWorkVol3 { get { return m_IntWorkVol3; } set { m_IntWorkVol3 = value; } }
        private int m_IntWorkVol4;
        public int IntWorkVol4 { get { return m_IntWorkVol4; } set { m_IntWorkVol4 = value; } }

		private double m_FloatKHedj;
		public double FloatKHedj { get { return m_FloatKHedj; } set { m_FloatKHedj = value; } }

		private int m_IntSellDisp;
		public int IntSellDisp { get { return m_IntSellDisp; } set { m_IntSellDisp = value; } }
		private int m_IntBuyDisp;
		public int IntBuyDisp { get { return m_IntBuyDisp; } set { m_IntBuyDisp = value; } }

		private int m_IntPackage;
		public int IntPackage { get { return m_IntPackage; } set { m_IntPackage = value; } }
		private int m_IntAveraging;
		public int IntAveraging { get { return m_IntAveraging; } set { m_IntAveraging = value; } }
		private int m_IntMax;
		public int IntMax { get { return m_IntMax; } set { m_IntMax = value; } }
		private int m_IntHotelka;
		public int IntHotelka { get { return m_IntHotelka; } set { m_IntHotelka = value; } }

        private int m_IntPackage2;
        public int IntPackage2 { get { return m_IntPackage2; } set { m_IntPackage2 = value; } }
        private int m_IntAveraging2;
        public int IntAveraging2 { get { return m_IntAveraging2; } set { m_IntAveraging2 = value; } }
        private int m_IntMax2;
        public int IntMax2 { get { return m_IntMax2; } set { m_IntMax2 = value; } }
        private int m_IntHotelka2;
        public int IntHotelka2 { get { return m_IntHotelka2; } set { m_IntHotelka2 = value; } }

        private int m_IntCurOpora;
        public int IntCurOpora { get { return m_IntCurOpora; } set { m_IntCurOpora = value; } }
        private int m_IntOpora;
        public int IntOpora { get { return m_IntOpora; } set { m_IntOpora = value; } }
        private int m_IntOpora2;
        public int IntOpora2 { get { return m_IntOpora2; } set { m_IntOpora2 = value; } }
        private int m_IntOpora3;
        public int IntOpora3 { get { return m_IntOpora3; } set { m_IntOpora3 = value; } }
        private int m_IntOpora4;
        public int IntOpora4 { get { return m_IntOpora4; } set { m_IntOpora4 = value; } }

        private int m_IntBeforeHedj;
        public int IntBeforeHedj { get { return m_IntBeforeHedj; } set { m_IntBeforeHedj = value; } }
        private int m_IntBeforeWork;
        public int IntBeforeWork { get { return m_IntBeforeWork; } set { m_IntBeforeWork = value; } }

        private int m_IntTop;
        public int IntTop { get { return m_IntTop; } set { m_IntTop = value; } }
        private int m_IntLeft;
        public int IntLeft { get { return m_IntLeft; } set { m_IntLeft = value; } }

        private int m_IntStakanHole;
        public int IntStakanHole { get { return m_IntStakanHole; } set { m_IntStakanHole = value; } }

        private int m_HedjMode;
        public int HedjMode 
        { get { 
            return m_HedjMode; } 
            set 
            {
                m_HedjMode = value;
                switch (value)
                {
                    case 0: IntCurWorkVol = IntWorkVol; IntCurOpora = IntOpora; break;
                    case 1: IntCurWorkVol = IntWorkVol2; IntCurOpora = IntOpora2; break;
                    case 2: IntCurWorkVol = IntWorkVol3; IntCurOpora = IntOpora3; break;
                    case 3: IntCurWorkVol = IntWorkVol4; IntCurOpora = IntOpora4; break;
                    default: IntCurWorkVol = IntWorkVol; IntCurOpora = IntOpora; break;
                }
            }
        }

        private double m_FloatAutoStep;
        public double FloatAutoStep { get { return m_FloatAutoStep; } set { m_FloatAutoStep = value; } }

        private int m_IntSellAllIn;
        public int IntSellAllIn { get { return m_IntSellAllIn; } set { m_IntSellAllIn = value; } }
        private int m_IntSellAllOut;
        public int IntSellAllOut { get { return m_IntSellAllOut; } set { m_IntSellAllOut = value; } }
        private int m_IntBuyAllIn;
        public int IntBuyAllIn { get { return m_IntBuyAllIn; } set { m_IntBuyAllIn = value; } }
        private int m_IntBuyAllOut;
        public int IntBuyAllOut { get { return m_IntBuyAllOut; } set { m_IntBuyAllOut = value; } }
	}
}
